#!/bin/sh

# Set these paths appropriately

BIN=/home/user/Downloads/TreeTagger/bin
CMD=/home/user/Downloads/TreeTagger/cmd
LIB=/home/user/Downloads/TreeTagger/lib

OPTIONS="-token -lemma -sgml -pt-with-lemma"

TOKENIZER=${CMD}/tokenize.pl
TAGGER=${BIN}/tree-tagger
ABBR_LIST=${LIB}/german-abbreviations
PARFILE=${LIB}/german.par
LEXFILE=${LIB}/german-lexicon.txt
FILTER=${CMD}/filter-german-tags

$TOKENIZER -a $ABBR_LIST $* |
# external lexicon lookup
perl $CMD/lookup.perl $LEXFILE |
# tagging
$TAGGER $OPTIONS $PARFILE  | 
# error correction
$FILTER
